Send Push Recommendation
π Overviewβ
The SendPushRecommendation API is used to send recommendations to clients via push notifications.
π Endpointβ
| Method | URL |
|---|---|
| POST | <protocol>://<host name>:<service port>/<service name>/<tenantid>/v1/SendPushRecommendation |
Requestβ
The request consists of the following parameters:
π₯ Request Parametersβ
| Parameter | Data Type | Mandatory / Optional | Description |
|---|---|---|---|
sessionKey | string | Mandatory | Session key from AuthenticateKeys API. Must be passed as Bearer Authorization Header. |
marketSegmentID | string | Mandatory | Value should be refered from Market segment ID table |
scripToken | string | Mandatory | Scrip token from scrip master. |
scripDescription | string | Mandatory | Scrip description from scrip master. |
recoType | string | Mandatory | Value should be refered from Recommendation type. |
price | string | Mandatory | Recommended price (e.g., 27.55). If blank/zero, system uses "Mkt". |
squareoffPrice | string | Optional | Square-off price. Must be > price for buy, < price for sell. "Mkt" if blank/zero. |
stoplossPrice | string | Optional | Stop-loss price. Must be < price for buy, > price for sell. "Mkt" if blank/zero. |
messageTitle | string | Optional | Push notification title. Default: "RESEARCH CALL". |
reportUrl | string | Optional | Analysis report URL. |
endTime | string | Optional | Validity date/time. Format: ddMMMyyyy HH:mm:ss (e.g., 31Jul2019 23:59:00). |
uniqueID | string | Optional | Unique reference identifier. |
topicNo | string | Mandatory | Topic number from GetFCMTopicList API |
topicName | string | Mandatory | Topic name from GetFCMTopicList API |
channelIds | string | Optional | Channel IDs for which recommendation to be sent. |
isHot | string | Optional | Flag to mark as a hot recommendation. |
isPopup | string | Optional | Set true for popup in Diet/TWS apps. |
isMessageBar | string | Optional | Set true for MessageBar alert in Diet/TWS apps. |
symbol | string | Optional | Symbol for which recommendation is sent. |
companyDesc | string | Optional | Company description. |
userCategoryId | string | Optional | Required if channels include 1 or 2 (Email/SMS). Category from User Category IDs |
userDetails | string | Optional | Dollar-separated user list: UserId1,GroupId1$UserId2,GroupId2. |
smsVendor | string | Optional | Required when channel includes SMS. Max 50 chars, alphanumeric, uppercase. |
categoryMode | string | Optional | 1 = MessageCategoryMode, 2 = UserCategoryMode, 3 = Users. |
messageCategoryId | string | Optional | Message category ID. Defaults to MANUAL_RECO. Overrides topicNo & topicName. |
Example Requestβ
Headersβ
{
"Authorization": "Bearer eyBDyGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdXN0b21lcklkIjoiMTUyMyIsIm5Ob2RlTGljZW5zZUV4cGlyeSI6IjE4OTM2MDkwMDAiLCJpYXQiOjE1NjM2MDI2Nzd9.oRVgIlN3K_m5AXh_K1M88exzBg96CYJEVo_LQ-YZ6Yd"
}
Request Bodyβ
{
"marketSegmentID": "1",
"scripToken": "842",
"scripDescription": "NSE EQ DHFL",
"recoType": "104",
"price": "48.95",
"squareoffPrice": "53.55",
"stoplossPrice": "45.55",
"messageTitle": "INTRADAY CALL",
"reportUrl": "",
"endTime": "31Jul2019 23:59:00",
"uniqueID": "31072019121508",
"topicNo": "6",
"topicName": "intraday",
"channelIds": "17$9",
"isHot": "true",
"isPopup": "true",
"isMessageBar": "true",
"symbol": "",
"companyDesc": "",
"userCategoryId": "",
"userDetails": "",
"smsVendor": "",
"categoryMode": "",
"messageCategoryId": ""
}
Responseβ
The ResponseObject contains the following parameters in a JSON structure:
π§ͺ Response Parametersβ
| Parameter (Key) | Data Type | Description |
|---|---|---|
status | boolean | Indicates the status of the request. true if the response is successful, false if an error occurred. |
errorCode | string | Error code if any error occurred. |
errorString | string | Error description. |
recoID | string | Systemβgenerated recommendation ID used for updating this recommendation later. |
Example Responseβ
{
"status": true,
"errorCode": "",
"errorString": "",
"recoID": "245WAADOAA"
}